<?php
	$process_type = "edit";	// Please choose only ONE !! Edit / Preview / Delete . 'Edit' and 'Add' are considered as the same value.
	$process_module_name = "footer";	// Module Name
	$process_module_id = "8";	// Module ID
	$process_module_sub_id = "0";	// Module Sub ID
	$process_module_category = "module"; // Module Category
	$rowDivWidth = 90;	// Width for first column label form (pixel)
	$form_name = "form_textfooter";	// Form Name
	$form_action = "proc_text.php";	// Form Action
?>
<div class="content">
	<form action="process/<?php echo $form_action; ?>" method="post" enctype="multipart/form-data" name="<?php echo $form_name; ?>" id="files" style="margin:0; padding:0;">
	<?php include("action/act_includes_global/1_act_inc_global_formstartconfig.php"); // Do not Edit !!! ?>
	<?php include("action/act_includes_global/3_act_inc_global_formrowdatahidden.php"); // Do not Edit !!! Every form must include this file !  ?>
	
	<div class="content_header_left">
		<!-- Start Content Header Left -->
		<?php include("ws_includes/1_ws_inc_priviligestring.php"); ?>
		<?php include("ws_includes/2_ws_inc_headerlabel.php"); ?>
		<!-- End Content Header Left -->
	</div>
	<div class="content_header_right">
		<!-- Start Content Header Right -->
		
		<!-- End Content Header Right -->
	</div>
	<div style="clear:both;"></div>
	<div class="content_body">
		<!-- Start Content Body -->
		<?php if($privilegeView == 1) { ?>
		<?php
			$_SESSION['moduleid'] = $process_module_id;
			$_SESSION['modulename'] = $process_module_name;
			$_SESSION['submoduleid'] = $process_module_sub_id;
			$sql = "select a.*, b.filename 
					from tbl_text a
						left join ms_file b
							on a.texturlimage = b.fileid and b.filerole = 'image' and b.stsrc = 'A'
					where a.moduleid = ".$_SESSION['moduleid']." and a.textname = '".$_SESSION['modulename']."' and a.stsrc = 'A' order by a.textposition asc";
			$exe = mysql_query($sql) or die(mysql_error());
			$num = mysql_num_rows($exe);
			$row = mysql_fetch_array($exe);
			
			if($num > 0)
			{
		?>
		<div>
			<div class="divFormRowData">
				<div style="float:left; text-align:right; width:<?php echo $rowDivWidth; ?>px;">Content</div>
				<div style="float:left;">&nbsp;:&nbsp;</div>
				<div style="float:left;">
					<textarea class="ckeditor" <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> name="txt_text_content" style="width:700px; height:140px; max-height:140px;"><?php echo $row['textcontent']; ?></textarea>
				</div>
				<div style="clear:both;"></div>
			</div>
			<div class="divFormRowData">
				<div style="float:left; text-align:right; width:<?php echo $rowDivWidth; ?>px;">Activate</div>
				<div style="float:left;">&nbsp;:&nbsp;</div>
				<div style="float:left;">
					<input type="hidden" name="txt_text_PK_id" value="<?php echo $row['textid']; ?>" />
					<input type="hidden" name="txt_text_label" value="<?php echo $row['textlabel']; ?>" />
					<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_text_activate" value="1" <?php if(isset($row['textstatus'])){if($row['textstatus'] == 1){echo "checked='true'";}} ?> /> Yes
					<input <?php if($process_type == "PREVIEW" || $process_type == "DELETE"){echo "disabled='disabled'";} ?> type="radio" name="rdo_text_activate" value="0" <?php if(isset($row['textstatus'])){if($row['textstatus'] == 0){echo "checked='true'";}} ?> /> No
				</div>
				<div style="clear:both;"></div>
			</div>
		</div>
		<div style="padding-top:10px;">
			<input type="submit" name="Submit" value="Update" />
		</div>
		<?php
			}
		?>
		<?php } ?>
		<!-- End Content Body -->
	</div>
	<div style="clear:both;"></div>
	</form>
</div>